<template>
  <Rate v-model="rate" />
  <Child2></Child2>
</template>

<script>
import { toRef, toRefs, defineComponent } from "vue";
import Child2 from "@/components/child2.vue";
export default defineComponent({
  components: {
    Child2
  },
  props: {
    rate: Number
  },
  setup(props) {
    console.log(props, 'props');
    // const rate = toRef(props, 'rate')
    const {rate} = toRefs(props)
    return {
      rate
    }
  }
})
</script>